package com.yc.mysql.mapper;

import com.yc.mysql.bean.SpMovie;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SpMovieMapper {

    List<SpMovie> selectByObject(SpMovie movie);

    int update1(SpMovie movie);
    int update2(SpMovie movie);
    SpMovie selectById(int id);

    List<SpMovie> selectByFlag(@Param("name") String name,
                               @Param("flag") int flag);

    // id in (1,2,3,4,5)
    List<SpMovie> selectByIds(@Param("ids") List<Integer> asdfasdfasdf);

    void insert(SpMovie movie);

    List<SpMovie> selectWithOrder(@Param("order") String order);

    List<Map<String,Object>> selectBySql(@Param("sql") String sql);


    List<SpMovie> selectColumn1();

    List<Map<String,Object>> selectColumn2();
}
